﻿using System;
/// <summary>
/// 删除接口
/// </summary>
namespace PageAdmin.Utils.BLL
{
    /// <summary>
    /// 根据id删除
    /// </summary>
    public interface IDelete<T> where T : class, new()
    {
        /// <summary>
        /// 执行前的委托
        /// </summary>
        Func<T, TipsInfo> Executing { get; set; }

        /// <summary>
        /// 执行后的委托
        /// </summary>
        Func<T, TipsInfo> Executed { get; set; }


        /// <summary>
        /// 根据id删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        TipsInfo Delete(int id);

        /// <summary>
        /// 自定义条件删除
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="paramter"></param>
        /// <returns></returns>
        TipsInfo Delete(string condition,object paramter);
    }


}